//
//  TLRechargeHistoryTableViewCell.m
//  WXReader
//
//  Created by huaya on 2025/3/22.
//  Copyright © 2025 Andrew. All rights reserved.
//

#import "TLRechargeHistoryTableViewCell.h"

@interface TLRechargeHistoryTableViewCell ()
@property (weak, nonatomic) IBOutlet UILabel *oneLab;
@property (weak, nonatomic) IBOutlet UILabel *timeLab;
@property (weak, nonatomic) IBOutlet UILabel *payStatusLab;
@property (weak, nonatomic) IBOutlet UILabel *typeLab;

@end

@implementation TLRechargeHistoryTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setModel:(TLRechargeHistoryModel *)model{
    if (model) {
        _model = model;
        
        
//        _oneLab.text = [NSString stringWithFormat:@"$%@ %@",model.totalMoney,[model.isVip isEqualToString:@"1"]?@"Vip":@"Coin"];
        
        _oneLab.text = [NSString stringWithFormat:@"%@:$%@",model.goodsName,model.totalMoney];
            
        _timeLab.text = model.createTime;
        
        //        支付状态（1待支付 ，2已支付 ，3 已取消 ，4关闭
        if (model.purchaseState.intValue == 1) {
            _payStatusLab.text = @"Pending";
        }else if (model.purchaseState.intValue == 2) {
            _payStatusLab.text = @"Paid";
        }else if (model.purchaseState.intValue == 3) {
            _payStatusLab.text = @"Cancelled";
        }else{
            _payStatusLab.text = @"Close";
        }
        
//        支付方式（0微信,1快捷支付,2支 付宝,3.苹果支付）
//        if (model.payWay.intValue == 0) {
//            _typeLab.text =@"WeChat";
//        }else if (model.payWay.intValue == 1) {
//            _typeLab.text =@"Quick payment";
//        }else if (model.payWay.intValue == 2) {
//            _typeLab.text =@"";
//        }else if (model.payWay.intValue == 3) {
//            _typeLab.text =@"App";
//        }
    }
}

@end
